import Axios from 'axios'
import Cookies from 'js-cookie'
import qs from 'qs'
import router from '../router'
import ElementUI from 'element-ui'; 
import {
	Message,
	MessageBox
} from 'element-ui'
const IP = window.IP
const http = Axios.create()
// http.defaults.timeout = 20000
let set = 0
const REG = /^http/
var custom = null

let ROOT, GetJson // 目的是在开发环境中能够跨域请求文件

if (process.env.NODE_ENV === 'development') {
	console.log('2022-7-12 ---- 更新时间 -------V1.0 ----- 版本号');

	// console.log('开发环境')
	// ROOT = '/web'
	ROOT = IP.httpsUrl
	GetJson = IP.resourUrl

	// Custom = '/com'
} else if (process.env.NODE_ENV === 'production') {
	console.log('2022-8-5 ---- 更新时间 -------V1.0.8 ----- 版本号');

	// console.log('生成环境')
	ROOT = IP.httpsUrl
	GetJson = IP.resourUrl
	// Custom = IP.customUrl
}
// 响应拦截
http.interceptors.response.use((res) => {
	console.log(res,'http-res')
	// 可以验证tooken
	// sessionStorage.setItem('error', 410)
	// if (res.data.code == 410) {
	// 	set++
	// 	if (set == 1) {
	// 		sessionStorage.clear();
	// 		ElementUI.Message({
	// 			message: '该账号在别处已经登录',
	// 			type: 'error'
	// 		});
	// 		sessionStorage.setItem('loginFlagData', true)
	// 		router.replace({
	// 			path: '/login'
	// 		})
	// 		set = 0
	// 	}

	// } else if (res.data.code == 408) {
	// 	Message.error(res.data.message)
	// } else if (res.data.code == 405) {
	// 	Message.error(res.data.message)
	// }
	return res
}, function(error) {
	// // 请求错误做的事
	// if (error.response.data.code == 405) {
	//   Message.error(error.response.data.message)
	// }
	return Promise.reject(error)
})

// // 添加请求拦截
// http.interceptors.request.use((config) => {
//   // 下一个项目可以在这就将请求头信息在这里配置完成
//   return config
// }, function (error) {
//   console.log(error);
//   this.$message.error(error.response.data.message);
//   // 请求错误做的事
//   return Promise.reject(error)
// })

// // 响应拦截
// http.interceptors.response.use((res) => {
//   // 可以验证tooken
//   if (res.status !== 200) {
//     Message.error('请求出错')
//   }
//   return res
// }, function (error) {
//   // 请求错误做的事
//   Message.error('请求出错了，请检查网路或联系管理员')
//   return Promise.reject(error)
// })
// get请求 json请求
const getRequest = (data) => {
	let newUrl = REG.test(data.url) ? data.url : ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		// console.log(token);
		return http({
			method: 'get',
			url: newUrl,
			params: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {}
}
// get - form 请求
const getRequestForm = (data) => {
	let newUrl = REG.test(data.url) ? data.url : ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		// console.log(token);
		return http({
			method: 'get',
			url: newUrl,
			params: data.data,
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
				'Authorization': token
			}
		})
	} else {}
}
// get请求
// const getRequestTest = (data) => {
//   let newUrl = Custom + data.url
//   return http({
//     method: 'get',
//     url: newUrl,
//     params: data.data,
//     headers: {
//       'Content-Type': 'application/json;charset=utf-8'
//     }
//   })
// }
//  参数在 url 拼接上的
const getRequestID = (data) => {
	// console.log(data.data)
	let newUrl
	if (data.data) {
		newUrl = ROOT + data.url + data.data
	}
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'get',
			url: newUrl,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {}
}

// 有占位，有拼接
const getRequestIDAndParam = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			params: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {

	}
}
const GptpostRequestForm = (data) => {
	let newUrl = REG.test(data.url) ? data.url : IP.httpsUrlGpt + data.url
	const token = sessionStorage.getItem('manageToken')
	let dataForm = deleObjToForm(data.data)
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			// responseType: 'blob',		// response类型

			data: dataForm,
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
				'Authorization': token

			}
		})
	}

	function deleObjToForm(obj) {
		if (obj.constructor === Object) {
			let keys = Object.keys(obj)
			let formData = new FormData()
			keys.forEach(tt => {
				formData.append(tt.toString(), obj[tt])
			})
			return formData
		} else {
			throw new Error('必须传递对象')
		}
	}
}
// post请求
const GptpostRequest = (data, flag) => {
	let newUrl

	newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token

			}
		})
	}
}
const GptpostRequestData = (data) => {
	let newUrl = IP.httpsSet + data.url
	console.log(data, '所有的数据');
	// const token = sessionStorage.getItem('manageToken')
	return http({
		method: 'post',
		url: newUrl,
		data: data.data,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
		}
	})
}
const closeSseRequestData = (data) => {
	let newUrl = IP.httpsSet + data.url
	console.log(data, '所有的数据');
	// const token = sessionStorage.getItem('manageToken')
	return http({
		method: 'get',
		url: newUrl,
		params: data.data.query,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
			'uid': data.data.uid
		}
	})
}
// 获取数据
const getRequesttdata = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'get',
			url: newUrl,
			params: data.data.query,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	}
}

// 获取json数据
const getJsonRequest = (data) => {
	let newUrl = GetJson + data.data.url
	return http({
		method: 'get',
		url: newUrl,
		headers: {
			'Content-Type': 'application/json;charset=utf-8'
		}
	})
}

// post请求
const postRequest = (data, flag) => {
	let newUrl
	if (flag) {
		newUrl = ROOT + data.url
	} else {
		newUrl = ROOT + data.url
	}
	newUrl =data.type === 1?data.url:  ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (flag) {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'X-Access-Token': token

			}
		})
	} else {
		if (token) {
			return http({
				method: 'post',
				url: newUrl,
				data: data.data,
				headers: {
					'Content-Type': 'application/json;charset=utf-8',
					'Authorization': token
				}
			})
		} else {
			this.$router.push(`/login?redirect=${this.$route.fullPath}`);
		}
	}
}

// post请求
const postFormRequest = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded',
				'Authorization': token
			}
		})
	}
}

/**
 * 用于序列化数组 变成 ids='ss'&ids='88'
 * @param {*} params {ids:['ss','88']}
 */
const updataArr = (params) => {
	return qs.stringify(params, {
		indices: false
	})
}

const postFormRequestArr = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: updataArr(data.data),
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
				'Authorization': token
			}
		})
	}
}

// post form表单形式
const postRequestForm = (data) => {
	let newUrl = REG.test(data.url) ? data.url : ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	let dataForm = deleObjToForm(data.data)
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: dataForm,
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
				'Authorization': token
			}
		})
	}

	function deleObjToForm(obj) {
		if (obj.constructor === Object) {
			let keys = Object.keys(obj)
			let formData = new FormData()
			keys.forEach(tt => {
				formData.append(tt.toString(), obj[tt])
			})
			return formData
		} else {
			throw new Error('必须传递对象')
		}
	}
}

// 占位 post
const postRequestID = (data) => {
	let newUrl = ROOT + data.url + data.data
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {
		return http({
			method: 'post',
			url: newUrl,
			headers: {
				'Content-Type': 'application/json;charset=utf-8'
			}
		})
	}
}

const postRequestParams = (data) => {
	let newUrl = ROOT + data.url
	return http({
		method: 'post',
		url: newUrl,
		params: data.data,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
			'Organizational': '1'
		}
	})
}

const postRequestEdt = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			params: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	}
}

const postRequestDELETE = (data) => {
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'DELETE',
			url: newUrl,
			params: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token

			}
		})
	}
}

// post与get 混合请求
const postAdnGetRequest = (data) => {
	let newUrl = ROOT + data.url + '?id=' + data.id
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8'
			}
		})
	}
}

// 修改数据方法
/**
 * 返回请求url 和 请求头部
 * @param {Object} data
 */
const getURLAndHeader = (data) => {
	const token = sessionStorage.getItem('manageToken')
	return {
		URL: ROOT + data.url,
		HEADER: {
			'Authorization': token
		}
	}
}
// 返回 视频通话 中的截图和文件上
const getAddFiles = (data, fn) => {
	custom = Axios.CancelToken.source()
	console.log(custom);
	let newUrl = ROOT + data.url
	const token = Cookies.get('tokenCokens')
	console.log('数据展示', newUrl);

	let conObj = getConHttpObj('post', newUrl)
	conObj.data = data.data
	conObj.onUploadProgress = fn
	conObj.cancelToken = custom.token
	// console.log(conObj.cancelToken);
	console.log(conObj.cancelToken)
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			params: null,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
		// conObj.headers['Content-Type'] = 'multipart/form-data'
		// conObj.headers.Authorization = token
		// console.log('22222')
		// console.log(token)
	}
	// // console.log('333333')
	// console.log(token)
	// console.log(conObj)
}
const cancelUpdateFile = () => {
	custom.cancel()
}
const postAndGetRequest = (data) => {
	let newUrl = ROOT + data.url + '?userId=' + data.id
	const token = sessionStorage.getItem('manageToken')
	if (token) {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8',
				'Authorization': token
			}
		})
	} else {
		return http({
			method: 'post',
			url: newUrl,
			data: data.data,
			headers: {
				'Content-Type': 'application/json;charset=utf-8'
			}
		})
	}
}

function getConHttpObj(methods, urls) {
	return {
		method: methods,
		url: urls,
		params: null,
		data: null,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
			'Authorization': ''
		}
	}
}
// 导出数据
function exportGet(data) {
	console.log(data.data, '导出参数')
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	return http({
		method: 'get',
		url: newUrl,
		data: data.data,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
			'Authorization': token
		},
		responseType: "arraybuffer",
	})

}

function exportPost(data) {
	console.log(data.data, '导出参数')
	let newUrl = ROOT + data.url
	const token = sessionStorage.getItem('manageToken')
	return http({
		method: 'post',
		url: newUrl,
		data: data.data,
		headers: {
			'Content-Type': 'application/json;charset=utf-8',
			'Authorization': token
		},
		responseType: "arraybuffer",
	})

}
export default {
	login: data => postRequest({
		url: 'https://openapi.mp.usr.cn/usrCloud/V6/user/getAuthToken',
		data,
		type:1,
	}, true), // 登录
	getCusdevices: data => postRequest({
		url: 'https://openapi.mp.usr.cn/usrCloud/V6/cusdevice/getCusdevices',
		type:1,
		data
	}, true), // 获取设备列表
	getCusdevicesPoints: data => getRequest({
		url: 'http://72348wb20dh.vicp.fun:12842/api/DeviceData?cusdeviceNo=xxx',
		 
	}, true), // 获取设备列表
	getPointNewData:data => postRequest({
		url:'https://history.usr.cn:7002/history/cusdevice/lastDataPoint',
		type:1,
		data
	}, true),
	// 步骤中心
	addTask: data => postRequest({
		url: '/assist/task/add',
		data
	}), // 创建步骤
	getTaskList: data => getRequesttdata({
		url: '/assist/task/page',
		data
	}), // 获取步骤
	deleteTast: data => postRequestID({
		url: '/assist/task/del?id=',
		data
	}), // 删除步骤
	alterNoJsonTast: data => postRequest({
		url: '/assist/task/upd',
		data
	}), // 修改非json的内容
	uploadFiles: data => addTasks({
		url: '/assist/task/updTaskAddressById',
		data
	}), // 添加步骤
	// getAssign: data => getRequest({ url: '/staff/manage/queryStaffAllByUsername', data }), // 模糊获取指派的工程师
	addOrAlterJson: (id, data) => postAdnGetRequest({
		url: '/assist/upload/addJsonFile',
		id,
		data
	}), // 添加json
	getFinishTask: data => getRequesttdata({
		url: '/assist/task/record/page',
		data
	}), // 获取已完成的步骤列表
	getInitJson: data => getJsonRequest({
		data
	}), // 获取json数据
	// getStateSelectData: data => getRequesttdata({ url: '//', data }), // 获取未完成的步骤列表
	// 权限>角色管理
	roleManagement: data => getRequest({
		url: '/role/customQueryArray',
		data
	}), //获取角色数据
	getChildAdmin: data => getRequest({
		url: '/role/getChildAdmin',
		data
	}), //获取角色数据
	listAdmin: data => postRequest({
		url: '/user-operation/listAdmin',
		data
	}), //批量子管理员添加
	getPersonnel: data => postRequestEdt({
		url: '/assist/task/getPersonnel',
		data
	}), //巡检转交列表
	taskTurn: data => postRequestEdt({
		url: '/assist/task/turn',
		data
	}), //巡检转交确认
	getInfo: data => getRequest({
		url: '/user/info'
	}), //获取当前登录用户信息
	deleDatas: data => postRequestDELETE({
		url: '/role/del',
		data
	}), //删除角色
	roleGetId: data => getRequest({
		url: '/role/getId',
		data
	}), //查询角色
	addManageDatas: data => postRequest({
		url: '/role/save',
		data
	}, true), //添加角色
	chineseTraditional: data => postRequest({
		url: '/role/upd',
		data
	}, true), //修改角色
	switchState: data => postRequestEdt({
		url: '/role/updRoleDefaultById',
		data
	}, 'flag'), //修改角色选中状态
	// 部門
	departmentOf: data => getRequest({
		url: '/department/manage/tree',
		data
	}), //获取部门树状列表
	updmentOf: data => getRequest({
		url: '/department/manage/upd',
		data
	}), //修改部门
	departmentSort: data => getRequest({
		url: '/department/manage/treeSort',
		data
	}), //交换部门排序
	addDepartMentOf: data => postRequest({
		url: '/department/manage/add',
		data
	}), //增加部门
	departmentToquery: data => getRequest({
		url: '/department/manage/getlist',
		data
	}), //查询部门
	deleteInBatches: data => postRequest({
		url: '/role/updRoleDefaultById',
		data
	}), //批量删除
	deletlOf: data => getRequesttdata({
		url: '/department/manage/del',
		data
	}), //删除
	searchPersons: data => postRequest({
		url: '/user/userReq',
		data
	}), //部门搜索人员		
	//  人员
	personalAdd: data => postRequest({
		url: '/user-operation/register',
		data
	}), //增加人员
	personalFlag: data => postRequestEdt({
		url: '/user-operation/updEnable',
		data
	}), //增加人员
	personaSerch: data => postRequest({
		url: '/user/userReq',
		data
	}), //搜素人员
	personalget: data => getRequest({
		url: '/user/get',
		data
	}), //查询用户信息
	peDitlAdd: data => getRequestIDAndParam({
		url: '/user-operation/upd',
		data
	}), //编辑人员
	cancelApply: data => postRequestDELETE({
		url: '/assist/instance/procInst',
		data
	}), //撤回工单
	personalDele: data => getRequestIDAndParam({
		url: '/user/del',
		data
	}), //删除人员
	personalOf: data => getRequestIDAndParam({
		url: '/user/tree',
		data
	}), //人员树状图
	personalcallTree: data => getRequestIDAndParam({
		url: '/user/callTree',
		data
	}), //人员树状图协作专用
	editsetlOf: data => getRequestIDAndParam({
		url: '/user/showAll',
		data
	}), //查询人员
	showAllList: data => getRequestIDAndParam({
		url: '/user/showAllList',
		data
	}), //人员列表
	// 协作
	getRoomState: data => getRequest({
		url: '/call/examineRoomStateByRoomId',
		data
	}),
	getDefaultUser: data => postRequestForm({
		url: '/user/getDefaultUser',
		data
	}), //默认用户组
	setDefaultUser: (id, data) => postAndGetRequest({
		url: '/user/defaultUser',
		id,
		data
	}), //设置默认用户组
	callRoomHistoryVideo: data => postRequestEdt({
		url: '/call/callRoomHistoryVideo',
		data
	}), //房间内人员搜索
	joinByNumber: data => getRequest({
		url: '/call/showRoomIdByCallRoomNumber',
		data
	}),
	// 专家
	territoryAdd: data => postRequest({
		url: '/territory/add',
		data
	}), //添加标签
	peopleAdd: data => postRequest({
		url: '/territory/peopleAdd',
		data
	}), //添加标签下的人员
	showAll: data => postRequestEdt({
		url: '/territory/show',
		data
	}), //标签列表
	showAllPage: data => getRequest({
		url: '/territory/showAllPage',
		data
	}), //专家列表
	territoryDel: data => postRequestEdt({
		url: '/territory/del',
		data
	}), //删除专家类型
	territoryUpd: data => postRequest({
		url: '/territory/upd',
		data
	}), //修改专家类型
	// 巡检
	ReleaseWorkOrder: data => postRequest({
		url: '/assist/leave/add',
		data
	}), //存储巡检
	Releasefont: data => postRequestForm({
		url: '/assist/person/show/',
		data
	}), //执行人
	Releasefontall: data => postRequestForm({
		url: '/assist/person/show/0',
		data
	}), //执行人回显时
	upgrading: data => postRequest({
		url: '/assist/leave/view',
		data
	}), //更新巡检
	delOrder: data => postRequestID({
		url: '/assist/leave/del/',
		data
	}), //删除巡检
	repairOrder: data => postRequest({
		url: '/assist/leave/listPage',
		data
	}), //待发布巡检列表
	orderSteps: data => postRequestParams({
		url: '/assist/leave/step',
		data
	}), //查询巡检步骤
	orderDetail: data => getRequest({
		url: '/assist/leave/getId',
		data
	}),
	releaseOrder: data => postRequest({
		url: '/assist/instance/start',
		data
	}), //巡检提交发布，启动流程实例
	approveOrder: data => postRequest({
		url: '/assist/task/complete',
		data
	}), //巡检审批
	approveServe: data => postRequest({
		url: '/assist/task/back',
		data
	}), //巡检驳回
	locationList: data => getRequestID({
		url: '/location/list/',
		data
	}), //执行地点
	textAddList: data => postRequestEdt({
		url: '/assist/leave/reply',
		data
	}), //巡检回复-回复
	leaveUrge: data => postRequestEdt({
		url: '/assist/leave/urge',
		data
	}), //巡检回复-催单
	getIdentity: data => postRequestEdt({
		url: '/assist/leave/getIdentity',
		data
	}), //巡检回复-查询回复的身份验证
	operaTionLog: data => postRequestEdt({
		url: '/assist/leave/operationLog',
		data
	}), //巡检回复-操作日志
	getReply: data => postRequestEdt({
		url: '/assist/leave/getReply',
		data
	}), //巡检回复-拉取所有回复
	getUploadFileUrl: data => getURLAndHeader({
		url: '/assist/upload/add',
		data
	}), //巡检步骤数据上传
	addResourcesUrl: () => getURLAndHeader({
		url: '/assist/upload/addAndCover'
	}), //巡检回复-拉取所有回复
	delComplete: data => postRequestID({
		url: '/assist/leave/delComplete/',
		data
	}), //删除完结工单
	// 巡检设置
	responsiblePerson: data => postRequest({
		url: '/location/add',
		data
	}), //存储巡检
	setPonsiblePerson: data => postRequest({
		url: '/assist/person/add',
		data
	}), //执行人
	setPonsiblePersonList: data => postRequest({
		url: '/location/listPage',
		data
	}), //属地责任列表
	deleblePersonList: data => getRequestID({
		url: '/location/delete/',
		data
	}), //属地责任列表
	updatePersonList: data => postRequest({
		url: '/location/update',
		data
	}), //更新归属地
	updatePersondata: data => getRequest({
		url: '/assist/person/getAll',
		data
	}), //获取审批流程
	timingAdd: data => postRequest({
		url: '/timing/add',
		data
	}), //添加定时发布
	timingPageAll: data => postRequest({
		url: '/timing/pageAll',
		data
	}), //查询定时发布列表
	timingDel: data => getRequest({
		url: '/timing/del',
		data
	}), //删除定时发布列表
	timinGet: data => getRequest({
		url: '/timing/get',
		data
	}), //删除定时发布列表
	timingUpd: data => postRequest({
		url: '/timing/upd',
		data
	}), //删除定时发布列表

	// 协助
	callAdd: data => postRequestEdt({
		url: '/call/add',
		data
	}), //创建房间
	showPage: data => postRequestEdt({
		url: '/call/showPage',
		data
	}), //房间列表  
	showOne: data => getRequest({
		url: '/call/showOne',
		data
	}), //房间列表 
	callRoomHistoryByUser: data => postRequestForm({
		url: '/call/callRoomHistoryByUser',
		data
	}), //协作历史
	callHistoryByUser: data => postRequestEdt({
		url: '/call/callHistoryByUser',
		data
	}), //呼叫记录 
	selectRoomPeople: data => postRequestEdt({
		url: '/call/selectRoomPeople',
		data
	}), //房间内人员搜索

	// getUploadFileUrl: data => getURLAndHeader({ url: '/assist/upload/add', data }), //巡检步骤数据上传
	modelList: data => getRequest({
		url: '/call/getFileModel',
		data
	}), //模型列表 
	getAddFileUrl: (data, config) => getAddFiles({
		url: '/assist/upload/add',
		data
	}, config), // 发送图片或者pdf文件、
	callupdRoom: data => postRequest({
		url: '/call/updRoom',
		data
	}), //设置模块 
	delRoomPeopleState: data => postRequestEdt({
		url: '/call/delRoomPeopleState',
		data
	}), //未加入移除
	callHistoryByUserDelete: data => postRequestEdt({
		url: '/call/callHistoryByUserDelete',
		data
	}), //删除呼叫记录
	chatRecordByRoomId: data => getRequest({
		url: '/call/chatRecordByRoomId',
		data
	}), //聊天记录
	callRoomHistoryByUserDelete: data => postRequestEdt({
		url: '/call/callRoomHistoryByUserDelete',
		data
	}), //删除呼叫记录
	callGetFileModel: data => getRequest({
		url: '/call/getFileModel',
		data
	}), //获取模型列表
	cancelUpdate: () => cancelUpdateFile(), // 取消上传
	// 隐患列表
	hiddenList: data => postRequest({
		url: '/hidden/trouble/listpage',
		data
	}),
	hiddenList1: data => postRequest({
		url: '/hidden/trouble/listpage1',
		data
	}),
	listPageTaiZhang: data => postRequest({
		url: '/hidden/trouble/listPageTaiZhang',
		data
	}),
	listpageshowCorp: data => postRequest({
		url: '/hidden/trouble/listpageShowCorp',
		data
	}),
	listpageShowApproved: data => postRequest({
		url: '/hidden/trouble/listpageShowApproved',
		data
	}),
	listpageShowRectified: data => postRequest({
		url: '/hidden/trouble/listpageShowRectified',
		data
	}),
	listpageShowAccepted: data => postRequest({
		url: '/hidden/trouble/listpageShowAccepted',
		data
	}),
	// 隐患
	verificationTroubleType: data => getRequest({
		url: '/hidden/trouble/verificationTroubleType',
		data
	}), //验证隐患级别和隐患类型是否为空
	setDangerLevel: data => postRequestForm({
		url: '/hidden/trouble/risk/level',
		data
	}), // 隐患级别
	setDangerType: data => postRequestForm({
		url: '/hidden/trouble/risktype/submit',
		data
	}), // 隐患类型
	dangerDetail: data => getRequest({
		url: '/hidden/trouble/getid',
		data
	}), // 隐患详情
	addReport: data => postRequest({
		url: '/hidden/trouble/add',
		data
	}), // 添加隐患
	delReport: data => postRequestForm({
		url: '/hidden/trouble/del',
		data
	}), // 删除隐患
	personalArrange: data => getRequestIDAndParam({
		url: '/hidden/trouble/tree',
		data
	}), // 安排整改人员
	recallRectification: data => postRequestEdt({
		url: '/hidden/trouble/recallRectification',
		data
	}), //撤回整改
	confirmTrouble: data => postRequestEdt({
		url: '/hidden/trouble/confirm',
		data
	}), // 安排整改
	riskResult: data => postRequestForm({
		url: '/hidden/trouble/risk/result',
		data
	}), // 风险评定-生成结果
	riskConfirm: (id, data) => postAdnGetRequest({
		url: '/hidden/trouble/risk/submit',
		id,
		data
	}), // 风险评定- 点击确认
	closeRectification: data => postRequest({
		url: '/hidden/trouble/CompleteRectification?status=0',
		data
	}), // 关闭整改
	completeRectification: data => postRequest({
		url: '/hidden/trouble/CompleteRectification?status=1',
		data
	}), // 完成整改
	closeAcceptance: data => postRequest({
		url: '/hidden/trouble/acceptanceTest?status=0',
		data
	}), // 不验收
	completeAcceptance: data => postRequest({
		url: '/hidden/trouble/acceptanceTest?status=1',
		data
	}), // 完成验收
	getHtevaluation: data => getRequest({
		url: '/hidden/trouble/getHtevaluation',
		data
	}), // 整改记录
	getHtdElareCorp: data => getRequest({
		url: '/hidden/trouble/getHtdElareCorp',
		data
	}), // 上报记录
	getHtacceptance: data => getRequest({
		url: '/hidden/trouble/getHtacceptance',
		data
	}), // 验收记录
	getInspectionPoints: data => getRequest({
		url: '/InspectionPointLocation/getPage',
		data
	}), // 巡检点列表 
	InspectionTableList: data => postRequestForm({
		url: '/InspectionTable/getPage',
		data
	}), // 巡检表数据
	lnspectionShiftList: data => postRequestForm({
		url: '/patrolClasses/getPage',
		data
	}), // 巡检班次列表数据
	changeShiftsList: data => postRequestForm({
		url: '/handover/getPage',
		data
	}), // 交接班列表数据
	inspectionPlanList: data => postRequestForm({
		url: '/scheme/getPage',
		data
	}), // 巡检计划
	delInspectionPoint: data => getRequest({
		url: '/InspectionPointLocation/del',
		data
	}), // 删除巡检点
	pointsTree: data => getRequest({
		url: '/InspectionPointLocation/tree',
		data
	}), // 上级巡检点树
	getPointsList: data => getRequest({
		url: '/InspectionPointLocation/getOneData',
		data
	}), // 巡检点不分页
	getTablesList: data => postRequest({
		url: '/InspectionTable/getAllTable',
		data
	}), // 巡检表不分页
	addInspectionPoint: data => postRequest({
		url: '/InspectionPointLocation/add',
		data
	}), // 添加巡检点  
	updateInspectionPoint: data => getRequest({
		url: '/InspectionPointLocation/upd',
		data
	}), // 编辑巡检点  
	getPointDetail: data => getRequest({
		url: '/InspectionPointLocation/getOneData',
		data
	}), // 巡检点详情  
	addInspectionTable: data => postRequest({
		url: '/InspectionTable/add',
		data
	}), // 添加巡检表 
	changePointStatus: data => getRequestForm({
		url: '/InspectionPointLocation/OpenEnable',
		data
	}), //巡检点是否启用  
	changePlanStatus: data => getRequestForm({
		url: '/scheme/OpenEnable',
		data
	}), //巡检计划是否可用 	
	delInspectionTable: data => postRequestForm({
		url: '/InspectionTable/del',
		data
	}), // 删除巡检表 
	getTableDetail: data => postRequestForm({
		url: '/InspectionTable/getOneTable',
		data
	}), // 获取巡检表详情  
	updateInspectionTable: data => postRequest({
		url: '/InspectionTable/upd',
		data
	}), //编辑巡检表
	delPatrolClasses: data => postRequestForm({
		url: '/patrolClasses/del',
		data
	}), // 删除巡检班次
	addPatrolClasses: data => postRequest({
		url: '/patrolClasses/add',
		data
	}), //添加巡检班次  
	updatePatrolClasses: data => postRequest({
		url: '/patrolClasses/upd',
		data
	}), // 编辑巡检班次  
	getClassDetail: data => getRequest({
		url: '/patrolClasses/getClass',
		data
	}), // 巡检班次详情	
	getClassAll: data => postRequest({
		url: '/patrolClasses/getall',
		data
	}), // 所有巡检班次 
	getAllClass: data => postRequest({
		url: '/scheme/getAllClass',
		data
	}), // 所有巡检班次
	getHandOverDepartment: data => postRequest({
		url: '/handover/getDepartment',
		data
	}), //交接班筛选部门  
	delHandover: data => postRequestForm({
		url: '/handover/del',
		data
	}), // 删除交接班 
	exportHandover: data => exportGet({
		url: '/handover/downloadExcel',
		data
	}), // 交接班导出数据  
	getHandoverDetail: data => getRequest({
		url: '/handover/getOne',
		data
	}), // 查看交接班详情  
	getPlanDetail: data => postRequestForm({
		url: '/scheme/getOne',
		data
	}), // 查看巡检计划详情  
	addPlan: data => postRequest({
		url: '/scheme/add',
		data
	}), // 添加巡检计划  
	updatePlan: data => postRequest({
		url: '/scheme/updById',
		data
	}), // 编辑巡检计划 
	delPlan: data => postRequestForm({
		url: '/scheme/del',
		data
	}), // 巡检计划  
	getBluetooth: data => postRequestForm({
		url: '/bluetooth/getPage',
		data
	}), // 蓝牙列表  
	addBluetooth: data => postRequest({
		url: '/bluetooth/add',
		data
	}), // 添加蓝牙  
	updateBluetooth: data => postRequest({
		url: '/bluetooth/upd',
		data
	}), // 编辑蓝牙  
	delBluetooth: data => postRequestForm({
		url: '/bluetooth/del',
		data
	}), // 删除蓝牙 
	getAllBluetooth: data => postRequest({
		url: '/bluetooth/getAll',
		data
	}), // 获取蓝牙数据
	getRouteById: data => getRequest({
		url: '/scheme/getByid',
		data
	}), // 获取巡检路线信息
	getTodayPage: data => postRequestForm({
		url: '/today/getPage',
		data
	}), // 今日巡检
	getToBeSearch: data => postRequestForm({
		url: '/today/getPageDaiXunJian',
		data
	}), // 待巡检搜索
	getAlreadySearch: data => postRequestForm({
		url: '/today/getPageYiXunJian',
		data
	}), // 已巡检搜索
	getHistorySearch: data => postRequestForm({
		url: '/today/getPageHistorySearch',
		data
	}), //巡检历史搜索
	getHistoryDepartment: data => postRequest({
		url: '/today/getDepartment',
		data
	}), //巡检历史的部门	
	getTodayDetail: data => getRequest({
		url: '/today/getone',
		data
	}), // 今日巡检详情  
	delToday: data => postRequestForm({
		url: '/today/del',
		data
	}), // 今日巡检删除  
	exportToday: data => exportGet({
		url: '/today/downloadExcel?status=' + data.status
	}), // 今日巡检数据导出  
	exportHistory: data => exportPost({
		url: '/today/downloadHistoryExcel?userId=' + data.userId,
	}),
	getTroublePlan: data => getRequest({
		url: '/troublePlan/pageTroublePlan',
		data
	}), // 排查计划 
	getTroublePlanName: data => getRequest({
		url: '/troublePlan/getTroublePlanName',
		data
	}), // 获取排查名称 
	getDefaultTroublePlanName: data => getRequest({
		url: '/troublePlan/restoreDefaultTroublePlanName',
		data
	}), // 恢复默认排查名称
	delTroublePlanName: data => postRequestForm({
		url: '/troublePlan/delTroublePlanName',
		data
	}), // 删除单个排查计划名称
	addTroublePlanName: data => postRequestForm({
		url: '/troublePlan/addTroublePlanName',
		data
	}), // 增加单个排查计划名称
	getTroublePlanDetail: data => getRequest({
		url: '/troublePlan/getOneTroublePlan',
		data
	}), // 排查计划详情 
	delTroublePlan: data => getRequest({
		url: '/troublePlan/delTroublePlan',
		data
	}), // 删除排查计划 
	delTroubleCycel: data => postRequestForm({
		url: '/troublePlan/delCycel',
		data
	}), // 删除排查历史
	addTroublePlan: data => postRequest({
		url: '/troublePlan/addTroublePlan',
		data
	}), // 添加排查计划  
	getShootList: data => postRequestForm({
		url: '/troublePlan/pageTroubleCycle',
		data
	}), // 排查历史列表/排查周期列表
	getTroubleCurrent: data => postRequestForm({
		url: '/troublePlan/getOneCycle',
		data
	}), // 排查历史详情/排查周期详情
	updTroublePlan: data => postRequest({
		url: '/troublePlan/updTroublePlan',
		data
	}), // 编辑排查计划	
	changeTroublePlanStatus: data => getRequestForm({
		url: '/troublePlan/updTroublePlanStartupState',
		data
	}), //排查计划是否可用
	// 岗位
	stationList: data => postRequest({
		url: '/assist/station/getList',
		data
	}), //岗位列表 
	searchStation: data => postRequestForm({
		url: '/assist/station/fuzzySearch',
		data
	}), //岗位列表搜索
	delStation: data => postRequestForm({
		url: '/assist/station/del',
		data
	}), //删除岗位
	addStation: data => postRequest({
		url: '/assist/station/add',
		data
	}), //添加岗位
	updateStation: data => postRequestForm({
		url: '/assist/station/upd',
		data
	}), //编辑岗位
	stationUsers: data => postRequestForm({
		url: '/assist/station/getUser',
		data
	}), //岗位人员
	addUsers: data => postRequestForm({
		url: '/assist/station/addUser',
		data
	}), //添加岗位人员
	delUsers: data => postRequestForm({
		url: '/assist/station/delList',
		data
	}), //批量删除岗位人员
	// 排班
	arrangeClassAll: data => postRequest({
		url: '/workforceManagement/getAllName'
	}), //不分页所有排班
	arrangeClassList: data => postRequestForm({
		url: '/workforceManagement/getPage',
		data
	}), //排班列表 
	delArrangeClass: data => postRequestForm({
		url: '/workforceManagement/del',
		data
	}), // 删除排班
	addArrangeClass: data => postRequest({
		url: '/workforceManagement/add',
		data
	}), //添加排班
	updArrangeClass: data => postRequest({
		url: '/workforceManagement/upd',
		data
	}), //编辑排班
	getArrangeClassDetail: data => getRequest({
		url: '/workforceManagement/getWorkforceManagement',
		data
	}), //排班详情
	childDepartment: data => getRequest({
		url: '/department/manage/getlistNoHavethis',
		data
	}), //查询下级部门
	getPatrolDepartment: data => getRequest({
		url: '/department/manage/getPatrolDepartment',
		data
	}), //有巡检计划的部门
	getCalendarDepartment: data => getRequest({
		url: '/workforceManagement/getDepartmentByPatrol',
		data
	}), // 巡检排班日历的部门列表
	delCalendarDepartment: data => postRequest({
		url: '/workforceManagement/delDepartment?id=' + data
	}), // 巡检排班日历部门的删除接口
	arrangeMonthList: data => postRequestForm({
		url: '/workforceManagement/getMonth',
		data
	}), //排班表
	// 数据统计
	getPatrolAllDepartment: data => getRequest({
		url: '/department/manage/getPatrolAllDepartment',
		data
	}), //查询所有部门
	getPatrolCount: data => postRequest({
		url: '/today/PatrolCount',
		data
	}), //巡检累计
	getPatrolHidden: data => postRequestForm({
		url: '/today/patrolHidden',
		data
	}), //巡检看板中月份内的隐患复制地址复制文档
	// 模型
	getModelList: data => postRequestForm({
		url: '/hiddenModel/getPage',
		data
	}), // 模型列表
	delModel: data => postRequestForm({
		url: '/hiddenModel/delModel',
		data
	}), //删除模型
	addModel: data => postRequest({
		url: '/hiddenModel/insModel',
		data
	}), //添加模型
	getModel: data => postRequestForm({
		url: '/hiddenModel/getModelById',
		data
	}), // 模型详情
	departHiddenModel: data => postRequest({
		url: '/hiddenModel/getModel',
		data
	}), //通过部门查询模型
	updModel: data => postRequest({
		url: '/hiddenModel/updModel',
		data
	}), //编辑模型
	getHiddenAllDepartment: data => getRequest({
		url: '/department/manage/getHiddenAllDepartment',
		data
	}), //首页模型用的部门列表
	modelAllDepartment: data => getRequest({
		url: '/department/manage/getAll',
		data
	}), //模型详情部门列表
	// 只知识库
	qrcodeList: data => postRequestEdt({
		url: '/twocode/getPage',
		data
	}), //	二维码列表 
	addQrcode: data => postRequest({
		url: '/twocode/add',
		data
	}), //添加二维码
	editQrcode: data => postRequest({
		url: '/twocode/save',
		data
	}), //编辑二维码
	delQrcode: data => postRequestEdt({
		url: '/twocode/del',
		data
	}), //删除二维码
	resetQrcode: data => postRequestEdt({
		url: '/twocode/productTwoCode',
		data
	}), //
	qrCodeDetail: data => getRequest({
		url: '/twocode/getOne',
		data
	}), //二维码详情
	resourceList: data => postRequestEdt({
		url: '/resource/getPage',
		data
	}), //资源库列表
	addResource: data => postRequest({
		url: '/resource/add',
		data
	}), //添加资源库
	delResource: data => postRequestEdt({
		url: '/resource/del',
		data
	}), //删除资源库
	resourceDetail: data => postRequestEdt({
		url: '/resource/getOne1',
		data
	}), //资源库详情
	editResource: data => postRequest({
		url: '/resource/save',
		data
	}), // 编辑资源库
	allResource: data => postRequestEdt({
		url: '/resource/getAll',
		data
	}), //全部资源库

	// 工作流
	getWorkflowPage: data => getRequestForm({
		url: '/assist/workflow/getWorkflowPage',
		data
	}), // 工作流列表
	addWorkflow: data => postRequest({
		url: '/assist/workflow/add',
		data
	}), //添加工作流
	updWorkflow: data => postRequest({
		url: '/assist/workflow/upd',
		data
	}), //编辑工作流
	delWorkflow: data => postRequestForm({
		url: '/assist/workflow/del',
		data
	}), //删除单个工作流
	publishWorkflow: data => getRequest({
		url: '/assist/workflow/publish',
		data
	}), // 发布工作流
	onceTaskList: data => getRequest({
		url: '/assist/workflow/getWorkflowOncePage',
		data
	}), //分页查询单次任务
	onceTaskHistoryList: data => getRequest({
		url: '/assist/workflow/getWorkflowOnceHistoryPage',
		data
	}), //分页查询单次任务历史记录
	delOnceHistory: data => getRequest({
		url: '/assist/workflow/delWorkflowOnceHistory',
		data
	}), //删除单次任务历史记录
	getWorkflowDetail: data => getRequest({
		url: '/assist/workflow/getOneWorkflow',
		data
	}), //查询单个工作流详情
	onceTaskDetail: data => getRequest({
		url: '/assist/workflow/getWorkflowOnce',
		data
	}), // 查看单次任务进行中详情
	onceHistoryDetail: data => getRequest({
		url: '/assist/workflow/getWorkflowOnceHistory',
		data
	}), // 查看单次任务历史记录详情
	delWorkflowOnce: data => getRequest({
		url: '/assist/workflow/delWorkflowOnce',
		data
	}), // 
	// 设备 
	getAllRegionDevice: data => postRequest({
		url: '/InspectionPointLocation/getAllDistrictAndEquipment'
	}), //查询所有区域(并附带设备)
	deviceCode: data => postRequestForm({
		url: '/InspectionTable/productTwoCode',
		data
	}),
	// 培训
	getTrainPage: data => postRequestForm({
		url: '/assist/train/getTrainPage',
		data
	}), //分页查询培训计划
	addTrain: data => postRequest({
		url: '/assist/train/add',
		data
	}), //添加培训计划
	getTrainHistory: data => postRequestForm({
		url: '/assist/train/getTrainHistoryPage',
		data
	}), //分页查询培训历史
	delTrain: data => postRequestForm({
		url: '/assist/train/del',
		data
	}), // 删除培训计划
	getTrainDetail: data => postRequestForm({
		url: '/assist/train/getTrainDetail',
		data
	}), //查询单个培训计划详情
	getTrainHistoryDetail: data => postRequestForm({
		url: '/assist/train/getWebTrainHistoryDetail',
		data
	}), // 查看培训历史详情
	trainScore: data => postRequest({
		url: '/assist/train/updTrainFraction',
		data
	}), //评分
	delTrainHistory: data => postRequestForm({
		url: '/assist/train/delTrainHistoryById',
		data
	}), // 删除培训历史
	// rtc接口录制
	recordStart: data => postRequestForm({
		url: '/call/recordStart',
		data
	}), //rtc录制打开
	recordStop: data => postRequestForm({
		url: '/call/recordStop',
		data
	}), //rtc录制关闭
	saveVideoAddress: data => postRequest({
		url: '/call/saveVideoAddress',
		data
	}), //rtc录制关闭
	//设备单检
	getPage: data => postRequestForm({
		url: '/assist/ScanInspection/getPage',
		data
	}), //设备单检列表
	delOnce: data => postRequest({
		url: '/assist/ScanInspection/delOnce',
		data
	}), //删除单检任务
	getOnce: data => postRequestForm({
		url: '/assist/ScanInspection/getOnce',
		data
	}), //删除单检任务
	// chatGPt
	createTalk: data => GptpostRequestForm({
		url: '/gpt/createTalk',
		data
	}, 'createTalk'), //用户创建新的对话
	showUserTalk: data => GptpostRequestForm({
		url: '/gpt/showUserTalk',
		data
	}, 'showUserTalk'), //获取用户的所有创建的对话
	delById: data => GptpostRequestForm({
		url: '/gpt/delById',
		data
	}, 'createTalk'), //获取用户的所有创建的对话
	gpt4: data => GptpostRequestData({
		url: 'chat',
		data
	}, 'createTalk'), //发送ChatGpt对话
	closeSse: data => closeSseRequestData({
		url: 'closeSse',
		data
	}, 'createTalk'), //链接sse
	getTalkByid: data => GptpostRequestForm({
		url: '/gpt/getTalkByid',
		data
	}, 'showUserTalk'), //对话列表
	updTalk: data => GptpostRequestForm({
		url: '/gpt/upd',
		data
	}, 'createTalk'), //修改ChatGpt历史记录名称
	gptImage: data => GptpostRequestForm({
		url: '/gpt/image',
		data
	}, 'createTalk'), //修改ChatGpt历史记录名称
	insStopAnswer: data => GptpostRequest({
		url: '/gpt/insStopAnswer',
		data
	}, 'createTalk'), //暂停ChatGpt问答
	joinAgainList: data => postRequestForm({
		url: '/call/callRoomJoinByUserId',
		data
	}),
	//甲烷检测列表
	getGasPage: data => postRequestForm({
		url: '/gas/getGasPage',
		data
	}),
	delGasContent: data => postRequestForm({
		url: '/gas/delGasContent',
		data
	}), //甲烷删除
	// 人脸识别 
	getPageFace: data => getRequest({
		url: '/facedatabase/getPageFace',
		data
	}), //分页查询人脸库 
	addFace: data => postRequest({
		url: '/facedatabase/insFace',
		data
	}), // 人脸库添加人脸
	updFace: data => postRequest({
		url: '/facedatabase/updFace',
		data
	}), // 人脸库修改人脸
	delFace: data => postRequest({
		url: '/facedatabase/delFace',
		data
	}), //人脸库删除人脸
	getPageFaceSearch: data => getRequest({
		url: '/facedatabase/getPageFaceSearch',
		data
	}), //分页查识别记录
	delFaceSearch: data => getRequest({
		url: '/facedatabase/delFaceSearch',
		data
	}), //删除识别记录
	getpageList: data => getRequest({
		url: '/riskAssessment/getpageList',
		data
	}), //风险评估列表
	delRiskAssessment: data => getRequest({
		url: '/riskAssessment/delRiskAssessment',
		data
	}), //风险评估列表删除
	getRiskAssessment: data => getRequest({
		url: '/riskAssessment/getRiskAssessment',
		data
	}), //风险评估详情 
	getWarningPageList: data => getRequest({
		url: '/riskAssessment/getWarningPageList',
		data
	}), //常规预警列表
	getRiskWarningById: data => getRequest({
		url: '/riskAssessment/getRiskWarningById',
		data
	}), //常规预警详情
	delRiskWarning: data => getRequest({
		url: '/riskAssessment/delRiskWarning',
		data
	}), //删除常规预警
	getAllRiskAssessment: data => getRequest({
		url: '/riskAssessment/getAllRiskAssessment',
		data
	}), //预警监测的系统预警
	getRiskMonitoring: data => getRequest({
		url: '/riskAssessment/getRiskMonitoring',
		data
	}), //预警监测的动态预警
	getAllRiskWarning: data => getRequest({
		url: '/riskAssessment/getAllRiskWarning',
		data
	}), //预警监测的常规预警
	addAppointmentCall: data => postRequestForm({
		url: '/call/addAppointmentCall',
		data
	}), // 添加预约协作
	delAppointmentCall: data => postRequestForm({
		url: '/call/delAppointmentCall',
		data
	}), // 删除预约协作
	queryAppointmentCallUserArrived: data => postRequestForm({
		url: '/call/queryAppointmentCallUserArrived',
		data
	}), //查询预约房间的谁到了谁没到列表
	getModelFiles: data => getRequest({
		url: '/modelCompile/getPage',
		data
	}),// 获取模型文件列表(分页)
	addModelFile: data => postRequestForm({
		url: '/modelCompile/addFileModel',
		data
	}),//添加模型文件
	updateModelFile: data => getRequest({
		url: '/modelCompile/update',
		data
	}),// 编辑模型文件
	delModelFile: data => getRequest({
		url: '/modelCompile/delModel',
		data
	}), // 删除模型文件
	pushModelFile: data => getRequest({
		url: '/modelCompile/pushModel',
		data
	}),// 发布模型
	// getLinkResourceList: data => postRequest({
	// 	url:'/twocode/getList',
	// 	data
	// 	}),// 模型编辑器使用-公共知识库
}